//
//  AXCheck.m
//  TestMac
//
//  Created by 小星星吃KFC on 2021/7/9.
//

#import "AXCheck.h"

@implementation AXCheck

+(BOOL)isEmpty:(id)obj {
    if (obj == nil) {
        return YES;
    }
    
    if ((NSNull*)obj == [NSNull null]) {
        return YES;
    }
    
    if ([obj respondsToSelector:@selector(count)]) {
        if ([(id)obj count] == 0) {
            return YES;
        }
    }
    
    if ([obj respondsToSelector:@selector(length)]) {
        if ([(id)obj length] == 0) {
            return YES;
        }
    }
    
    return NO;
}

+(BOOL)isNil:(id)obj {
    
    if (obj == nil) {
        return YES;
    }
    
    if ((NSNull*)obj == [NSNull null]) {
        return YES;
    }
    return NO;
}





@end
